home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
c
/
ljl.exe
/
PORTDIR.H
< prev
Wrap
C/C++ Source or Header
|
1992-09-12
|
2KB
|
62 lines
/***************************************************************************/
/* */
/* Copyright (c) 1990, Bob Withers */
/* */
/* Files to allow portable access to directory and file structure info */
/* across MSDOS and OS/2 compilers. */
/* */
/***************************************************************************/
#ifndef PORTDIR_H
#define PORTDIR_H
#include <time.h>
#define FILEATTR_NORMAL 0x00
#define FILEATTR_RDONLY 0x01
#define FILEATTR_HIDDEN 0x02
#define FILEATTR_SYSTEM 0x04
#define FILEATTR_LABEL 0x08
#define FILEATTR_DIR 0x10
#define FILEATTR_ARCH 0x20
struct S_DirectEntry
{
unsigned char d_attr;
time_t d_datetime;
unsigned long d_filesize;
unsigned short d_namlen;
char d_name[13];
};
typedef struct S_DirectEntry DIRECTENTRY;
void * DirOpen(char *pathname, unsigned uAttr);
DIRECTENTRY * DirRead(void *pHandle);
void DirClose(void *pHandle);
/* UNIX compatibility */
#define DIRSIZ 64
typedef void DIR;
struct dirent
{
unsigned char d_attr;
time_t d_datetime;
unsigned long d_filesize;
unsigned short d_namlen;
char d_name[13];
};
DIR *opendir(char *pathname);
struct dirent *readdir(DIR *pDir);
void closedir(DIR *pDir);
#endif